import Dile_APi from "@/api";
import { object_Inf } from "@/utils/typings/index.type";
import { moldDataTypeEnum } from "../index.type";

/*
 * @Descripttion:模具Dashboard-数据类型工具类
 * @LastEditors: xzh
 * @LastEditTime: 2023-11-10 01:12:40
 */
export default class MoldDataTypeListUtils {
  /**
   * @Author: xzh
   * @Descripttion: 设备数据类型列
   * @Param:
   */
  static tableColumnMap: object_Inf = {
    //模次数据
    [moldDataTypeEnum.moldNumData]: [
      {
        field: "code",
        //t('page.moldManageArr.moldArchivesArr.code')
        title: "page.moldManageArr.moldArchivesArr.code",
      },
      {
        field: "name",
        //t('page.moldManageArr.moldArchivesArr.name')
        title: "page.moldManageArr.moldArchivesArr.name",
      },
      {
        field: "mouldLife",
        //t('page.dashboardManageArr.moldDashboardArr.mouldLife')
        title: "page.dashboardManageArr.moldDashboardArr.mouldLife",
      },
      {
        field: "totalNum",
        //t('page.dashboardManageArr.moldDashboardArr.totalNum')
        title: "page.dashboardManageArr.moldDashboardArr.totalNum",
      },
      {
        field: "surplusNum",
        //t('page.dashboardManageArr.moldDashboardArr.surplusNum')
        title: "page.dashboardManageArr.moldDashboardArr.surplusNum",
      },
    ],
    //模次维修
    [moldDataTypeEnum.moldRepair]: [
      {
        field: "code",
        //t('page.moldManageArr.moldArchivesArr.code')
        title: "page.moldManageArr.moldArchivesArr.code",
      },
      {
        field: "name",
        //t('page.moldManageArr.moldArchivesArr.name')
        title: "page.moldManageArr.moldArchivesArr.name",
      },
      {
        field: "repairCode",
        //t('page.moldRepairArr.moldRepairRecordArr.code')
        title: "page.moldRepairArr.moldRepairRecordArr.code",
      },
      {
        field: "repairManager",
        //t('page.moldRepairArr.moldRepairRecordArr.manager')
        title: "page.moldRepairArr.moldRepairRecordArr.manager",
      },
      {
        field: "repairSatrtDate",
        //t('page.moldRepairArr.moldFaultTypeArr.startDate')
        title: "page.moldRepairArr.moldFaultTypeArr.startDate",
        formatter: "formatDateTime",
      },
      {
        field: "repairEndDate",
        //t('page.moldRepairArr.moldFaultTypeArr.endDate')
        title: "page.moldRepairArr.moldFaultTypeArr.endDate",
        formatter: "formatDateTime",
      },
      {
        field: "repairInfo",
        //t('page.moldRepairArr.moldRepairRecordArr.repairInfo')
        title: "page.moldRepairArr.moldRepairRecordArr.repairInfo",
      },
    ],
    //模次保养记录
    [moldDataTypeEnum.moldUpkeepRecord]: [
      {
        field: "mouldCode",
        //t('page.moldManageArr.moldArchivesArr.code')
        title: "page.moldManageArr.moldArchivesArr.code",
      },
      {
        field: "mouldName",
        //t('page.moldManageArr.moldArchivesArr.name')
        title: "page.moldManageArr.moldArchivesArr.name",
      },
      {
        field: "maintenanceCode",
        //t('page.moldUpkeepArr.upkeepCode')
        title: "page.moldUpkeepArr.upkeepCode",
      },
      {
        field: "maintenanceManger",
        //t('page.equipUpkeepArr.upkeepPlanArr.manager')
        title: "page.equipUpkeepArr.upkeepPlanArr.manager",
      },
      {
        field: "startDate",
        //t('page.equipUpkeepArr.upkeepRecordArr.startDate')
        title: "page.equipUpkeepArr.upkeepRecordArr.startDate",
        formatter: "formatDateTime",
      },
      {
        field: "endDate",
        //t('page.equipUpkeepArr.upkeepRecordArr.endDate')
        title: "page.equipUpkeepArr.upkeepRecordArr.endDate",
        formatter: "formatDateTime",
      },
      {
        field: "maintenanceInfo",
        //t('page.moldUpkeepArr.upkeepContent')
        title: "page.moldUpkeepArr.upkeepContent",
      },
    ],
    //模次保养记录
    [moldDataTypeEnum.moldUpkeepPlan]: [
      {
        field: "mouldCode",
        //t('page.moldManageArr.moldArchivesArr.code')
        title: "page.moldManageArr.moldArchivesArr.code",
      },
      {
        field: "mouldName",
        //t('page.moldManageArr.moldArchivesArr.name')
        title: "page.moldManageArr.moldArchivesArr.name",
      },
      {
        field: "planCode",
        //t('page.dashboardManageArr.moldDashboardArr.upkeepPlanCode')
        title: "page.dashboardManageArr.moldDashboardArr.upkeepPlanCode",
      },
      {
        field: "planManger",
        //t('page.equipUpkeepArr.upkeepPlanArr.manager')
        title: "page.equipUpkeepArr.upkeepPlanArr.manager",
      },
      {
        field: "startDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.startDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.startDate",
        formatter: "formatDateTime",
      },
      {
        field: "endDate",
        //t('page.equipUpkeepArr.upkeepPlanArr.endDate')
        title: "page.equipUpkeepArr.upkeepPlanArr.endDate",
        formatter: "formatDateTime",
      },
      {
        field: "planInfo",
        //t('page.moldUpkeepArr.upkeepContent')
        title: "page.moldUpkeepArr.upkeepContent",
      },
    ],
  };
}
